<extend name="public@base"/>
<block name="main">
  <div class="wrap js-check-wrap">
    <ul class="nav nav-tabs" role="tablist">
      <li class="nav-item"><a class="nav-link active" href="{:url('Menu/index')}">后台菜单</a></li>
      <li class="nav-item"><a class="nav-link" href="{:url('Menu/add')}">添加菜单</a></li>
      <li class="nav-item"><a class="nav-link" href="{:url('Menu/lists')}">所有菜单</a></li>
    </ul>
    <form class="js-ajax-form" action="{:url('Menu/listOrder')}" method="post">
      <div class="table-actions">
        <button class="btn btn-primary btn-sm js-ajax-submit" type="submit">{:lang('SORT')}</button>
      </div>
      <table class="table table-hover table-bordered table-list" id="menus-table">
        <thead>
          <tr>
            <th>{:lang('SORT')}</th>
            <th>ID</th>
            <th>{:lang('NAME')}</th>
            <th>操作</th>
            <th>{:lang('STATUS')}</th>
            <th>{:lang('ACTIONS')}</th>
          </tr>
        </thead>
        <tbody>{$category}</tbody>
        <tfoot>
          <tr>
            <th>{:lang('SORT')}</th>
            <th>ID</th>
            <th>{:lang('NAME')}</th>
            <th>操作</th>
            <th>{:lang('STATUS')}</th>
            <th>{:lang('ACTIONS')}</th>
          </tr>
        </tfoot>
      </table>
      <div class="table-actions">
        <button class="btn btn-primary btn-sm js-ajax-submit" type="submit">{:lang('SORT')}</button>
      </div>
    </form>
  </div>
</block>
<block name="bottom-script">
  <script>
    $(document).ready(function () {
        Wind.css('treeTable');
        Wind.use('treeTable', function () {
            $("#menus-table").treeTable({
                indent: 20
            });
        });
    });
  </script>
</block>